package com.zhhs.common.core.redis;

/**
 * @description: redis KEY分组
 * @author: xiaohu
 * @date: Created in 2021-10-26 16:43
 */
public enum Redis {
    //存储用户token
    token("%s:token:%s"),
    ;

    private final String prefix;
    /**
     * 项目名称前缀
     */
    private static final String PROJECT_NAME = "new_activity";

    Redis(String prefix) {
        this.prefix = prefix;
    }

    public String key(Object strKey) {
        return String.format(this.prefix, PROJECT_NAME, strKey);
    }

    public static String getProjectName() {
        return PROJECT_NAME;
    }

}
